<template>
  <tinymce v-model="currentValue" :height="300" />
</template>
<script>
import Tinymce from '@/components/Tinymce'
export default {
  components: {
    Tinymce
  },
  // eslint-disable-next-line vue/require-prop-types
  props: ['value', 'disabled', 'name'],
  data() {
    return {
      currentValue: this.value
    }
  },
  watch: {
    value(val) {
      this.currentValue = val
    },
    currentValue(val) {
      this.$emit('input', this.name, val)
    }
  },
  created() {
    this.currentValue = this.value
  }
}
</script>
